package mediadisplay.ui.colors 
{
	import flash.display.Sprite;
	import flash.events.Event;
	/**
	 * ...
	 * @author Anders Figenschow selvfølgelig
	 */
	public class ColorPicker extends Sprite
	{
		
		public function ColorPicker() 
		{
			if (stage) init();
			else addEventListener(Event.ADDED_TO_STAGE, init);
			
		}
		
		private function init(e:Event = null):void 
		{
			removeEventListener(Event.ADDED_TO_STAGE, init);
			drawPicker(0);
		}
		
		public function drawPicker(color:uint):void 
		{
			graphics.clear();
			graphics.beginFill(color);
			graphics.drawRect( -10, -10, 20, 20);
			graphics.endFill();
		}
		
	}

}